<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>指令</title>
</head>
<body>
        <div id="app">
                <div>{{ count }}</div>
                <div><button v-on:click="add">加数量</button></div>
                <div><button v-on:click="addNum(5, $event)">加5</button></div>
                <div><button @click="addNum(99)">加99</button></div>
              </div>
            
              <script src="../lib/vue.js"></script>
              <script>
                new Vue({
                  el: '#app',
                  data: {
                    count: 1
                  },
                  methods: {
                    add(e) {
                      console.log('加', e)
                      console.log(e.target)
                      this.count += 1
                    },
                    addNum(val, event) {
                      this.count += val
                      console.log('事件event对象：', event)
                    }
                  }
                })
              </script>
</body>
</html>